package com.xv.yan.beans.res;

import com.xv.yan.beans.entity.StudentDo;
import com.xv.yan.util.Constants;

import java.util.List;

public class TableResult<T>{
    private List<T> date;
    private int totalCount;//总共多少条
    private int pageNow;//透传
    private String studentName;//透传

    public List<T> getDate() {
        return date;
    }

    public void setDate(List<T> date) {
        this.date = date;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }


    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }

    public int getPageNow() {
        return pageNow;
    }

    public void setPageNow(int pageNow) {
        this.pageNow = pageNow;
    }

    //总页数
    public int getPageCount() {
        int pageCount=0;
        if (totalCount % Constants.PAGE_SIZE == 0){
            pageCount=totalCount / Constants.PAGE_SIZE;
        }else{
            pageCount = totalCount / Constants.PAGE_SIZE + 1;
        }
        return pageCount;
    }
}
